package com.yuhs.zixing.study.spring.boot.mybatis.base;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * @description:
 * @author: yuhs
 * @date: 2022/5/15
 */
@Data // getter、setter
@AllArgsConstructor // 全参构造⽅法
@NoArgsConstructor // ⽆参构造⽅法
@Accessors(chain = true) // 链式编程写法
public class IdEntity implements Serializable {

    private static final long serialVersionUID = -283273718153545880L;
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
}
